<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ include file="/WEB-INF/jsp/header.jsp" %>

<script language="JavaScript"> 
	document.getElementById('companies').style.display = 'block';
</script>


<%@ include file="/WEB-INF/jsp/partnerTools.jsp" %>


<h2> Company simulator </h2>

<table class="searchTable">
	<form:form method="POST" commandName="companySimulatorFetch">
	
	<tr>
		<td style="font-size: 10px" colspan="2">This tool will simulate daily profits of specified company.<br/>
		Salaries, product, raw prices will be read from the market.<br/>
		<br/>
		NOTE: It's still a simulation, you may experience unexpected problems with your company 
		(like no people to work, low wellness people, no people willing to buy your product) which will reduce your profits!
		<br/>
		</td>
	</tr>
	<tr>
		
	
		<td>
			Company country:
		</td>
		<td>
			<form:select path="country">
				<form:options itemLabel="name"/>
			</form:select>
		</td>
	</tr>
	
	<tr>
		<td>
			Company Quality:
		</td>
		<td>
			<form:select path="quality">
				<form:options itemLabel="name"/>
			</form:select>
		</td>
	</tr>
	
	<tr>
		<td>
			Product type:
		</td>
		<td>
			<form:select path="productType">
				<form:options itemLabel="name"/>
			</form:select>
		</td>
	</tr>
	
	<tr>
		<td>
			Hire workers with most profitable skill:
		</td>
		<td>
			<form:checkbox path="bestWorkers"/>
		</td>
	</tr>
	
		
	<tr>
		<td>
			Default workers' wellness:
		</td>
		<td>
			<form:select path="workerWellness">
				<form:options itemLabel="value"/>
			</form:select>
		</td>
	</tr>
	
	<tr>
		<td>
			Raw region:<br/>
			(only for raw companies)
		</td>
		<td>
			<form:select path="rawRegion">
				<form:options itemLabel="name"/>
			</form:select>
		</td>
	</tr>

	<tr>
		<td colspan="2">
			<center><input type="submit" value="Simulate"></center>
		</td>
	</tr>
	</form:form>
</table>
<br/>


<%@ include file="/WEB-INF/jsp/commercials.jsp" %>


<c:if test="${company != null}">

	<%@ include file="/WEB-INF/jsp/companyCalculatorComponent.jsp" %>

</c:if>







<%@ include file="/WEB-INF/jsp/bottom.jsp" %>

